<div class="row-fluid">
    <div class="span4">
        <form class="input-append">
            <h6>Add Facet Field</h6>
            <input bs-typeahead="fields.list" type="text" class="input-small" ng-model="newfield" ng-disabled="panel.fields.length >= panel.maxnum_facets">
            <button class="btn" ng-click="add_facet_field(newfield);newfield=''" ng-disabled="panel.fields.length >= panel.maxnum_facets"><i class="icon-plus"></i>
            </button>
        </form>
    </div>
    <div class="span8">
        <h6>Facet Fields
            <small>Click to remove</small>
        </h6>
        <span style="margin-left:3px" ng-click="remove_facet_field(field)" ng-repeat="field in $parent.panel.fields" class="label pointer remove">{{field}}</span>
    </div>
</div>

<h5>Options</h5>
<div class="row-fluid">
    <div class="span4">
        <h6> Title </h6>
        <input type="text" class="input-small" ng-model="panel.header_title">
    </div>
    <div class="span2">
        <h6>Facet Limit <tip>The maximum number of facets for a field that are returned.</tip></h6>
        <input bs-typeahead="fields.list" type="number" class="input-small" ng-model="panel.facet_limit">
    </div>
    <div class="span4">
        <h6>Max Number of Facet Fields <tip>The maximum number of fields for faceting. Warning: if we specify too many facets on a really big data, we could run into JVM Out Of Memory issue (depending on your setup).</tip></h6>
        <input type="number" class="input-small" ng-model="panel.maxnum_facets">
    </div>
</div>
